Conceptually a compositional reservoir simulator for simulating flow in a subterranean hydrocarbon-bearing reservoir can be viewed as modeling a series of connected mixing tanks of fluids (cells) at given pressure, temperature and compositions. As time evolves (as the simulator is taking time-steps toward some final time at which results are sought), conditions in the tanks change as a result of fluid movement, wells and other external factors. Flash calculations are necessary to establish, for each new set of pressure, temperature and overall fluid composition, the number of fluid phases, their amounts and compositions. This calculation fundamentally involves finding the minimum of a thermodynamic state function (the Gibbs Free Energy (GFE), and as such is iterative in nature and frequently difficult to converge and computationally expensive, particularly when detailed fluid models are used, i.e., when there are many hydrocarbon components present. There is therefore great interest in devising algorithms which are computationally efficient yet robust and accurate.
For the purpose of discussion, the activity performed in “flash” calculation shall be subdivided into stability testing, which attempts to reveal instability of a given phase at the current conditions; and split calculations, which aims at determining the equilibrium phases and compositions for an assumed phase configuration.
One approach to increasing the efficiency of flash calculations in a computational reservoir simulator is described by Claus P. Rasmussen, Kristian Krejbjerg, Michael L. Michelsen and Kersti E. Bjurstrom, Increasing the Computational Speed of Flash Calculations with Applications for Compositional, Transient Simulations, Society of Petroleum Engineers, SPE 84181, February 2006 SPE Reservoir Evaluation & Engineering. In performing flash calculations, the majority of time is spent doing stability analysis. Rasmussen et al. proposed criterion for bypassing many of the stability analysis checks.
Referring to FIG. 1, a pressure-temperature map is shown for a fluid in a cell. Point A is shown in a two-phase region where both a gas phase and a liquid phase exist. Point B is located on a transition line between a two-phase region and a one phase region (the phase boundary). Point C is located in a “shadow zone” of the one-phase region, close to the two-phase region. Finally, point D lies in a “remote” region far into the single-phase domain. Also, a vertical line is shown which separates single-phase liquid on the left and on the right is single-phase gas. Depending on where the estimated phase state of fluid in a cell, certain stability calculations may be omitted rather than performing stability analysis for all cells during iterations in a time. This general criterion for bypassing calculations shall be described in greater detail below with respect to the stability testing in Section 5.
The sub-steps corresponding to “split” and “stability” calculation described in Rasmussen et. al. use a “traditional” approach, with the attendant solution of nonlinear problems of size equal to the number of hydrocarbon components. There is scope for improving the efficiency of these sub-steps, particularly for simulation models involving a large number of components.
Firoozabadi, A. and Pan, H., Fast and Robust Algorithm for Compositional Modeling: Part I—Stability Analysis, SPE 63083 and Firoozabadi, A. and Pan, H., Fast and Robust Algorithm for Compositional Modeling: Part II—Two-Phase Flash, SPE 71603 discuss the application of reduced variable strategies for stability and split calculations in compositional reservoir simulation; however the authors do not teach how stability tests can be avoided. Also, the particular stability algorithm, as formulated, may experience convergence difficulties, particularly when encountering conditions far into the undersaturated zone. In addition, the split algorithm is formulated in terms of the vapor phase and will exhibit numerical and/or convergence difficulties near dew-points, due to the virtually non-existent liquid phase.
Newton's method is commonly used in solving nonlinear systems of equations. Care must be taken to ensure that iterates do not exceed physical bounds on the unknowns. In applying Newton's method to problems in phase behavior formulated in terms of reduced variables, there is a need to ensure that physical bounds on the reduced variables are not violated.
The shortcomings of previous methods for compositional reservoir simulations cited above will be addressed by the detailed description of the invention that follows below.